﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EvoAlgLib
{
    public abstract class BinaryFunc : Func
    {
        public BinaryFunc() : base(2) { }


        public override double getVal(params double[] args)
        {
            if (args.Count() < 2)
                throw new ArgumentException("This function takes exactly two arguements.");
            return this.binaryFunc(args[0], args[1]);
        }
        public abstract double binaryFunc(double x, double y);
    }
}
